import request from '@/utils/request'

/**
 * 获取用户资源列表
 */
export function listUserResourceApi(params?: any) {
    return request({
        url: '/sys/user-resource/list',
        method: 'get',
        params
    })
}

/**
 * 获取用户资源详情
 */
export function detailUserResourceApi(id: any) {
    return request({
        url: `/sys/user-resource/${id}`,
        method: 'get'
    })
}

/**
 * 审核用户资源
 */
export function reviewUserResourceApi(data: any) {
    return request({
        url: '/sys/user-resource/review',
        method: 'post',
        data
    })
}

/**
 * 批量审核用户资源
 */
export function batchReviewUserResourceApi(data: any) {
    return request({
        url: '/sys/user-resource/batch-review',
        method: 'post',
        data
    })
}

/**
 * 删除用户资源
 */
export function deleteUserResourceApi(ids: number[] | number) {
    return request({
        url: `/sys/user-resource/delete/${typeof ids === 'object' ? ids.join(',') : ids}`,
        method: 'delete'
    })
} 